<template>
  <view class="search" :style="{'height' : topHeight + 'px'}" @click="jumpSearchPage">
    <view class="search-view">
      <uni-icons type="search" size="15"></uni-icons>
      <text class="placeholder">搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    name:"cate-top-search",
    props: {
      'topHeight' : {
        type: Number,
        default: 50
      }
    },
    data() {
      return {
        
      }; 
    },
    methods: {
      jumpSearchPage() {
        this.$emit('search')
      }
    }
  }
</script>

<style lang="scss" scoped>
.search {
  background-color: #C00000;
  padding: 0 10px;
  display: flex;
  align-items: center;
  .search-view {
    background-color: #ffffff;
    border-radius: 15px;
    height: 65%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  .placeholder {
    font-size: 15px;
    margin-left: 5px;
  }
}
</style>